<template>
  <div class="component-batch-handle">
    <span>选中项：</span>
    <template v-for="(item,index) in config.manage.batch">
      <Dropdown v-if="item === 'status'"
                :key="index">
        <Button type="primary"
                shape="circle"
                ghost>
          审核
          <Icon type="ios-arrow-down"></Icon>
        </Button>
        <DropdownMenu slot="list">
          <DropdownItem v-for="(statusItem,statusIndex) in config.fields.status.config.options"
                        :key="statusIndex">{{ statusItem }}
          </DropdownItem>
        </DropdownMenu>
      </Dropdown>
      <Button :key="index"
              shape="circle"
              type="info"
              ghost
              v-if="item === 'edit'">修改
      </Button>
      <Button :key="index"
              shape="circle"
              type="error"
              ghost
              v-if="item === 'delete'">删除
      </Button>
    </template>
  </div>
</template>

<script>
  export default {
    name: "BatchHandle",
    data() {
      return {}
    },
    props: {
      config: {
        type: Object,
        require: true
      }
    }
  }
</script>

<style scoped lang="less">
.component-batch-handle{
  &>*{
    margin-right: @spaceCol;
    &:first-child{
      margin-right: 5px;
    }
  }
}
</style>